function t(t, e, i) {
    return e in t ? Object.defineProperty(t, e, {
        value: i,
        enumerable: !0,
        configurable: !0,
        writable: !0
    }) : t[e] = i, t;
}

function e(t, e) {
    if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
}

Object.defineProperty(exports, "__esModule", {
    value: !0
});

var i = function() {
    function t(t, e) {
        for (var i = 0; i < e.length; i++) {
            var n = e[i];
            n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), 
            Object.defineProperty(t, n.key, n);
        }
    }
    return function(e, i, n) {
        return i && t(e.prototype, i), n && t(e, n), e;
    };
}(), n = function(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}(require("../utils/util")), s = function() {
    function s(t) {
        var i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
        e(this, s), n.default.extend(this, {
            options: i
        }), this.page = t, this.__initState();
    }
    return i(s, [ {
        key: "__initState",
        value: function() {
            this.options.data && this.__initData(), this.options.methods && this.__methods();
        }
    }, {
        key: "__initData",
        value: function() {
            var e = this.options.scope, i = this.options.data;
            if (this._data = {}, !n.default.isEmptyObject(i)) for (var s in i) i.hasOwnProperty(s) && "function" != typeof i[s] && (this._data[s] = i[s]);
            this.page.setData(t({}, "" + e, this._data));
        }
    }, {
        key: "__methods",
        value: function() {
            var e = this.options.scope, i = this.options.methods;
            if (!n.default.isEmptyObject(i)) for (var s in i) i.hasOwnProperty(s) && "function" == typeof i[s] && (this[s] = i[s] = i[s].bind(this), 
            this.page[e + "." + s] = i[s], this.page.setData(t({}, e + "." + s, e + "." + s)));
        }
    }, {
        key: "setVisible",
        value: function() {
            var e, i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
            this.page.setData((e = {}, t(e, this.options.scope + ".animateCss", i), t(e, this.options.scope + ".visible", !0), 
            e));
        }
    }, {
        key: "setHidden",
        value: function() {
            var e = this, i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 300;
            this.page.setData(t({}, this.options.scope + ".animateCss", i)), setTimeout(function() {
                e.page.setData(t({}, e.options.scope + ".visible", !1));
            }, n);
        }
    } ]), s;
}();

exports.default = s;